Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates no data received message #75

Merged
merged 2 commits into from
Jul 26, 2024
Merged

updates no data received message #75

merged 2 commits into from
Jul 26, 2024

Conversation

bacalj
Copy link
Contributor

@bacalj bacalj commented Jul 23, 2024

This is a second PR (in addition to #74 ) that partially addresses issues described in PT-187533021 and PT-187569691

Updated and added some status update messages and logic:

  • Active stations with no data: Prompt user to try different frequency or nearby station.
  • Station selected without date range: Remind user to include date range.
  • User selects time period before station was active: Show "not active during date range" warning.

Demo: https://codap.concord.org/releases/latest/static/dg/en/cert/index.html?di=https://models-resources.concord.org/noaa-codap-plugin/branch/station-message

@bacalj bacalj requested a review from lbondaryk July 23, 2024 18:04
- Do not show station active message when no date range is selected
- In cases where user requests data from before a station existed, show station inactive warning
@bacalj bacalj requested a review from dougmartin July 23, 2024 19:15
}
// if the start date of the weather station is after the user's requested end date, then the station is inactive
const stationMinDate = new Date(weatherStation?.mindate || globalMinDate);
const stationNotActiveYet = stationMinDate > maxDate;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note on date range checks:
We currently only check if the station's start date is after the user's end date. We don't check the opposite (station's end date before user's start date) because our source data's end dates are not up-to-date (see note in PT-187533021) Implementing the opposite check could therefore result in false negatives for active stations.

@bacalj bacalj marked this pull request as ready for review July 23, 2024 19:21
Copy link
Member

@dougmartin dougmartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@bacalj bacalj merged commit 44b11fa into main Jul 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants